{include file=member.header.html}
{$build_editor}
<div class="content">
    {include file=member.menu.html}
    <div id="right"> {include file=member.submenu.html}
         <style type="text/css">
  #warning {
    background: none repeat scroll 0 0 #FFB7B7;
    border: 1px solid red;
    color: #000000;
    display: none;
    font-weight: normal;
    margin: 8px 0;
    padding: 3px 10px;
  }
.fontColor4
 {
    color: #9C9C9C;
 }

.padding3 {
    padding-left: 10px;
}
.field_notice {
    color: #9C9C9C;
    margin-left: 5px;
}
#warning label {
    display: block;
    margin: 3px 0;
}
form label.error {
    color: red;
    font-size: 12px;
    margin-left: 5px;
}
</style>
<script type="text/javascript">
//<!CDATA[
$(function(){
$('#partner_form').validate({
            errorPlacement: function(error, element){
                $(element).next('.field_notice').hide();
                if($(element).parent().parent().is('b'))
                {
                    $(element).parent().parent('b').next('.explain').hide();
                    $(element).parent().parent('b').after(error);
                }
                else
                {
                    $(element).after(error);
                }
            },
        
        rules : {
            title : {
                required   : true
            },
            picture : {
               accept : 'png|jpe?g|gif'
            },
            captcha : {
                required : true,
                remote   : {
                    url : 'index.php?app=captcha&act=check_captcha',
                    type: 'get',
                    data:{
                        captcha : function(){
                            return $('#captcha1').val();
                        }
                    }
                }
            }
        },
        messages : {
            title : {
                required : '{$lang.eror_name}'
            },
            picture : {
                accept   : '{$lang.logo_required}'
            },
            captcha : {
                required : '{$lang.captcha_required}',
                remote   : '{$lang.captcha_error}',
            }
        }
    });
   regionInit("region");
        $(".right").mouseover(function(){
            $(this).next("div").show();
        });
        $(".right").mouseout(function(){
            $(this).next("div").hide();
        });
});


//]]>

</script>

    <div id="warning"></div>
   <form method="post" action="index.php?app=qldangtin&amp;act=edit&amp;id={$dtin.id}&amp;user_id={$dtin.user_id}&amp;picture={$dtin.picture}" enctype="multipart/form-data" id="partner_form">
        <table width="95%" cellspacing="10" cellpadding="0" border="0" align="center">
        
           <tr>
            <td class="titlePostNews">
	          {$lang.cate_name}:
	           <sup class="colorRed">*</sup>
            </td>
            <td><input name="title" id="cate_name" type="text" value="{$dtin.title|escape}" class="inputTitleNews" style="width:300px"></td>
          </tr>
      
          <tr>
          <!--{if $dtin.picture eq ''} -->
           <td>&nbsp;</td>
			<td>
                 
			</td>
          <!--{else}-->
			<td>{$lang.anh}</td>
			<td>
                  <img src="{$dtin.picture}" width="100" height="100">
			</td>
		 </tr>
            <!-- {/if} -->
            <tr>
              <td class="titlePostNews"> {$lang.chon_anh}: </td>
              <td><input type="file" class="inputPostNews" name="picture" ectype="logo"/>
                <!--<input type="submit" name="Upload" value="" />-->
              </td>
            </tr>
          <tr>
            <td class="titlePostNews">
                {$lang.chuyen_muc}:
                  
            </td>
            <td><span class="height_row">
              <select  name="categories" class="Contact_text" id="categories">
               <option value="0">{$lang.select_pls}</option>
                {html_options options=$scategories selected=$dtin.categories}
              </select>
            </span></td>
          </tr>
          
            
            <tr>
            <td class="titlePostNews" >{$lang.tinh_thanh}
                
            </td>
            <td>
                 <div id="region">
                                    <input type="hidden" name="region_id" value="{$dtin.region_id}" class="mls_id" />
                                    <input type="hidden" name="region_name" value="{$dtin.address|escape}" class="mls_names" />
                                    <!-- {if $dtin.id} -->
                                    <span>{$dtin.address|escape}</span>
                                    <input type="button" value="{$lang.edit}" class="edit_region" />
                                    <select style="display:none">
                                      <option>{$lang.select_pls}</option>
                                      {html_options options=$regions}
                                    </select>
                                    <!-- {else} -->
                                    <select class="select">
                                      <option>{$lang.select_pls}</option>
                                      {html_options options=$regions}
                                    </select>
                                    <!-- {/if} --></div>
         </td>
          </tr>
          
       
          
          <tr>
            <td colspan="2" class="titlePostNews">
              {$lang.noi_dung}
             <sup class="colorRed">*</sup>
            </td>
            </tr>
          <tr>
          <tr>
            <td colspan="2">
               <textarea name="description" id="noidung"  style="width:100%; height:400px;">
               {$dtin.content}
               </textarea>
                <!--phan up anh san pham-->
                
                <!--het-->
             </td>
          </tr>
             <tr>
                <td style="color: #464646; font-size: 12px; font-weight: normal !important;width: 130px !important;">Xác nhận hình ảnh:</td>
                <td>
                    <input type="text" name="captcha" class="text" id="captcha1" />
                    <a href="javascript:change_captcha($('#captcha'));" class="renewedly"><img id="captcha" src="index.php?app=captcha&amp;{$random_number}" /></a>
                </td>
          </tr>
         
       
          <tr>
            <td></td>
            <td><input name="Send" type="submit" value=" Gửi đi "></td>
          </tr>
            
        </table>
        
        </form>

{include file=footer.html}